<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <title>vue-directive-window demo</title>
    <script src="./dist/vue-directive-window.umd.js"></script>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <style>
      .window {
        z-index: 100;
        box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
        border-radius: 4px;
        border: 1px solid #ebeef5;
        background-color: #fff;
        overflow: hidden;
        color: #303133;
      }

      .window__header {
        padding: 18px 20px;
        border-bottom: 1px solid #ebeef5;
        box-sizing: border-box;
      }

      .window__body {
        padding: 20px;
      }
      .container {
        padding: 30px;
      }
      .window2 {
        width: 200px;
        position: fixed;
        top: 0;
        bottom: 0;
        right: 10px;
      }
    </style>
  </head>
  <body>
    <div class="window window2 window--by-function">
      <div class="window__header">
        函数方式生成的窗口
      </div>
      <div class="window__body">
        <p>窗口内容1</p>
        <p>窗口内容2</p>
        <p>窗口内容3</p>
      </div>
    </div>
    <script>
      function enhanceWindow() {
        var windowParams = {
          windowSelector: '.window--by-function',
          minWidth: 10,
          minHeight: 100,
          // customMoveHandler: '.window__header',
        };
        window['vue-directive-window'].enhanceWindow(
          document.body,
          windowParams
        );
      }

      enhanceWindow();
    </script>
  </body>
</html>
